<!DOCTYPE html>
<html lang="fr">
	<head>
		<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
		<meta http-equiv="Content-Language" content="fr">
		<title>Déploiement de Pokmania</title>
		<style type="text/css">
			h1 { font-size: 100%; }
		</style>
	</head>
	<body>
<?php

# SVN
echo "<h1>Déploiement :</h1>";
$output = array();
$return = "";
exec("svn checkout http://pokmania.googlecode.com/svn/trunk/ . 2>&1", $output, $return);
echo "[".$return."] ".implode($output, "<br>")."<br>";

# Droits
$output = array();
$return = "";
echo "<h1>Rafraichissement des droits :</h1>";
exec("chmod 777 -R * 2>&1", $output, $return);
echo "[".$return."] ".implode($output, "<br>")."<br>";
exec("chmod 777 -R .svn 2>&1", $output, $return);
echo "[".$return."] ".implode($output, "<br>")."<br>";

### # Rétablissement des droits pour SVN
### exec("find -name .svn -exec chmod 700 -R '{}' \;");

# Compilation
$output = array();
$return = "";
echo "<h1>Compilation :</h1>";
exec("make 2>&1", $output, $return);
echo "[".$return."] ".implode($output, "<br>")."<br>";

echo "<h1>Terminé</h1>";

?>

	</body>
</html>
